#ifndef OBSERVER_VISITOR_H
#define OBSERVER_VISITOR_H
#include <any>
class ISubject;
class DataObserver;
class NoDataObserver;
#include "Data/FileContextWrapper.h"
class ObserverVisitor {
public:
    virtual ~ObserverVisitor() = default;

    virtual void visitDataObserver(DataObserver* observer, ISubject* subject, const std::any& data) = 0;
    virtual void visitNoDataObserver(NoDataObserver* observer, ISubject* subject) = 0;
};

class ConcreteObserverVisitor : public ObserverVisitor {
public:
    void visitDataObserver(DataObserver* observer, ISubject* subject, const std::any& data) override {
        // You need to use std::any_cast to get the value from data.
        std::cout << "ConcreteObserverVisitor visitDataObserver" << std::endl;
    }

    void visitNoDataObserver(NoDataObserver* observer, ISubject* subject) override {
        std::cout << "ConcreteObserverVisitor visitNoDataObserver" << std::endl;
    }
};


#endif // OBSERVER_VISITOR_H
